#include <stdio.h>
#include <malloc.h> 
#define STACK_SIZE 20

typedef int elemType;
typedef struct sqStack{
	elemType datas[STACK_SIZE];
	int top;
}sqStack;

sqStack* initStack(){
	sqStack *s;
	s=(sqStack *)malloc(sizeof(sqStack));
	
	if(s == NULL){
		return s;
	}
	s->top=-1;
	return s;
}

int isEmpty(sqStack *s){
	if(s->top == -1) return 1;
	return 0;
} 

int push(sqStack *s,elemType e){
	if(s->top == STACK_SIZE-1){
		return 0;
	}else{
		s->top++;
		s->datas[s->top]=e;
		
		return 1;
	}
}

int pop(sqStack *s,elemType *e){
	if(s->top == -1){
		return 0;
	}else{
		s->top--;
		*e=s->datas[s->top+1];
		return 1;
	}
}

void conversion(int N){
	int e;
	sqStack *s=initStack();
	
	while(N>0){
		push(s,N%2);
		N=N/2;
	}
	
	while(isEmpty(s)!=1){
		pop(s,&e);
		printf("%d",e);
	}
}

int main()
{
	int N;
	scanf("%d",&N);
	conversion(N);
	
	return 0;
}
